<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
    <script>
        $.ajax({
        url:"http://127.0.0.1:3000/books",
        //data : data,
        method : "GET",
        dataType : "json",
        success : function(data) {
                var str = '';
                var sylength = data.length;
				for (var i = 0; i < sylength; i++) {
                    str += '<li>'+ data[i].title+'</li>';
                    console.log(sylength);
				}
                $("#div1").append(str);	
			}      
        });
 
    </script>
</head>
<body>
    <ul id="div1">
        
    </ul>
</body>
</html>